@extends('admin/layout/master')
@section('title', '专栏添加')
@section('title2', '专栏添加')

@section('action')
    <a class="layui-btn layui-btn-small layui-btn-normal usersAdd_btn" href="{{ url('admin/case/index') }}"><i class="layui-icon"></i>专栏列表</a>
    <!-- <a class="layui-btn layui-btn-small layui-btn-danger batchDel"><i class="layui-icon"></i>导出数据</a> -->
@endsection

@section('content')
    <div class="error">
        @if (count($errors) > 0)
            <div class="alert alert-danger">
                错误列表：
                <ul>
                    @foreach ($errors->all() as $error)
                        <li>{{ $error }}</li>
                    @endforeach
                </ul>
            </div>
        @endif
    </div>

    <form class="layui-form" name="mainform" action="{{ url('/admin/case/store') }}" method="post">
        <div class="layui-form-item">
            <label class="layui-form-label">专栏名</label>
            <div class="layui-input-block">
                <input type="text" name="name" required  lay-verify="required" placeholder="请输入专栏名" value="{{ old('name') }}" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">排序</label>
            <div class="layui-input-block">
                <input type="text" name="weight" placeholder="越大越前" value="{{ old('weight') }}" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-input-block">
                {{ csrf_field() }}
                <button class="layui-btn" lay-submit lay-filter="formDemo">立即提交</button>
                <button type="reset" class="layui-btn layui-btn-primary">重置</button>
            </div>
        </div>
    </form>
@endsection

@section('layuijs')
    <script>
        //一般直接写在一个js文件中
        layui.use(['layer', 'form', 'upload'], function(){
            var layer = layui.layer
                    ,form = layui.form;
        });
    </script>
@endsection